]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
style: Add generic .icon-button class
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 2 Aug 2022 17:26:53 +0000 (19:26 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Aug 2022 18:00:08 +0000 (18:00 +0000)
The class is meant for buttons that only contain an icon, as
found in many GTK apps.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2397>

data/theme/gnome-shell-sass/_common.scss
data/theme/gnome-shell-sass/widgets/_buttons.scss

index 0b89700b43f1e91e5ca75cc940971a302e97d946..6372af49e313c4087a1a3e9d5a019e1ca4e87b65 100644 (file)
@@ -102,6 +102,24 @@ stage {
   &:checked { @include button(checked);}
 }
 
+// normal icon-only button
+%icon_button {
+  border-radius: 99px;
+  border-style: solid;
+  border-width: 1px;
+  font-weight: bold;
+  padding: $base_padding*2;
+
+  @include button(normal);
+  &:focus { @include button(focus);}
+  &:hover { @include button(hover);}
+  &:insensitive { @include button(insensitive);}
+  &:active { @include button(active);}
+  &:checked { @include button(checked);}
+
+  & > StIcon { icon-size: $base_icon_size; }
+}
+
 // buttons in dialogs/notifications
 // lighter in color and have a greater radius
 
index 6a72c079663e2f879af5add4fb0920d07d6cec95..df995245527bbe8aaa6b455d60b93fc23571b276 100644 (file)
@@ -4,3 +4,7 @@
   @extend %button; // that's it
   min-height: 22px;
 }
+
+.icon-button {
+  @extend %icon_button; // that's it
+}